﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PrintStrongName
{
    using System;
    using System.Reflection;
    using System.Windows.Forms;

    namespace StrongNameReader
    {
        internal sealed class Program
        {
            [STAThread]
            private static void Main(string[] args)
            {
                try
                {
                    if (args.Length == 1)
                    {
                        string assemblyName =
                        Assembly.ReflectionOnlyLoadFrom(args[0]).FullName;
                        Clipboard.SetText(assemblyName);
                        Console.WriteLine(assemblyName);
                    }
                    else
                    {
                        throw new ArgumentException(String.Format("Usage: {0} <assembly path>", Environment.GetCommandLineArgs()[0]));
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }
        }
    }
}
